home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / pbaseiv.zip / P4SPR002.TIP < prev    next >
Text File  |  1991-12-16  |  2KB  |  56 lines

  1. As a follow-up to "Easy Date-Entry Macro for 1-2-3" [January
  2. 1991 User Group Tips], I'd like to share a 1-2-3 date-entry
  3. macro I've used for years. You don't have to type in a year
  4. when you enter a date with this macro--it reads a default
  5. year from another cell.
  6.  
  7. To create the macro, enter the labels in the listing below
  8. into three columns, typing the four apostrophes where
  9. indicated (they won't appear in the cells). With the pointer
  10. on the cell containing \D, use the /Range Name Labels Right
  11. command to name the macro.
  12.  
  13. Before using the macro, enter the default year (e.g., 1991)
  14. in cell G1. Then, with the pointer on an appropriate cell,
  15. press <Alt>-D, enter the desired month, press <Enter>, type
  16. in the desired day, and press <Enter> again. For example,
  17. assuming your default year is 1991, pressing
  18. <Alt>-D6<Enter>16<Enter> would enter a date of June 16,
  19. 1991. To enter a year other than the default, press <Alt>-D,
  20. backspace three characters, and type the new year and a
  21. comma before entering the month number.
  22.  
  23. If you prefer to use the current year as your default,
  24. replace the formula in cell B2 with @string(@year(@now),0),
  25. and change the comment in C2 to "Fully automatic year
  26. entry." You won't need to put a year in G1, and you can
  27. still backspace to enter a different year number.
  28.  
  29. H. H. Michael Johl
  30. Montreal, Quebec, Canada
  31.  
  32. Postscript: Also see the tip "Serious Dating" for another
  33. way to use defaults for parts of dates.
  34.  
  35.  
  36. The apostrophes (') won't appear onscreen when you enter
  37. this Lotus 1-2-3 date-entry macro, which adds a default year
  38. value to your dates. A ready-to-use copy of this worksheet
  39. is available in the file P4SPREAD\AUTOYEAR.WK1 on your
  40. PowerBase *.* Volume IV diskette.
  41.  
  42.  
  43.        A               B                     C
  44.  
  45. 1    '\D      '@DATE(               Date Macro
  46. 2              @STRING(G1-1900,0)   Semi-automatic year entry
  47. 3             ',{?},{?})~           User enters month #, day #
  48. 4             '/RFD1~               Format date
  49.  
  50.  
  51. Title: Getting the Year by Default
  52. Category: SPR
  53. Issue date: Jun 1991
  54. Editor: Karl Koessel
  55. Supplementary files: P4SPREAD\AUTOYEAR.WK1
  56.